package com.megagoodsoftware.smugmug;

import android.os.*;

public class SmugMugAccount implements Parcelable {

	private String password;
	private String session;
	private int userId;
	private String type;
	private int filesizeLimit;
	private String nickName;
	private String displayName;

	public SmugMugAccount(Parcel in) {
		displayName = in.readString();
		filesizeLimit = in.readInt();
		nickName = in.readString();
		password = in.readString();
		session = in.readString();
		type = in.readString();
		userId = in.readInt();
	}

	public SmugMugAccount() {
	}

	@Override
	public String toString() {
		return "Session: " + session + "\nUserId: " + userId + "\nPassword Hash: " + password + "\nType: " + type + "\nFilesize Limit: " + filesizeLimit;
	}

	public String getPassword() {
		return password;
	}

	public void setSession(String session) {
		this.session = session;
	}

	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}

	public void setPassword(String hashPassword) {
		this.password = hashPassword;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setFilesizeLimit(int filesizeLimit) {
		this.filesizeLimit = filesizeLimit;
	}

	public String getSession() {
		return session;
	}

	public String getType() {
		return type;
	}

	public int getFilesizeLimit() {
		return filesizeLimit;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getDisplayName() {
		return displayName;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(getDisplayName());
		dest.writeInt(getFilesizeLimit());
		dest.writeString(getNickName());
		dest.writeString(getPassword());
		dest.writeString(getSession());
		dest.writeString(getType());
		dest.writeInt(getUserId());
	}

    public static final Parcelable.Creator<SmugMugAccount> CREATOR = new Parcelable.Creator<SmugMugAccount>() {
        public SmugMugAccount createFromParcel(Parcel in) {
            return new SmugMugAccount(in);
        }

        public SmugMugAccount[] newArray(int size) {
            return new SmugMugAccount[size];
        }
    };

}
